package org.jeecg.modules.lottery.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 抽签规则配置类
 * 集中管理抽签相关的系统参数
 */
@Component
@Data
@ConfigurationProperties(prefix = "lottery")
public class LotteryConfig {

    /**
     * 每次中标次数衰减比
     */
    private double params = 0.1;

    /**
     * 次数权重
     */
    private double paramsAmountThreshold = 1.0 / 3;

    /**
     * 金额权重
     */
    private double paramsgetAmountReductionRate = 1.0 / 3;

    /**
     * 评分权重
     */
    private double performanceReductionMap = 1.0 / 3;

    /**
     * 超出金额值
     */
    private double threshold = 40.0;

    /**
     * 每次中标超出金额衰减比
     */
    private double reductionRate = 0.1;

    /**
     * 选择抽签规则：1-次数，2-次数+金额，3-评价
     */
    private String[] type = {"1","3"};

    /**
     * 最小调整系数
     */
    private double minFactor = 0.1;

    /**
     * 最大调整系数
     */
    private double maxFactor = 1.5;

    /**
     * 最大衰减百分比
     */
    private double maxReduction = 50.0;

    /**
     * 履约评价等级1对应的衰减值
     */
    private double performanceLevel1Reduction = 20.0;

    /**
     * 履约评价等级2对应的衰减值
     */
    private double performanceLevel2Reduction = 15.0;

    /**
     * 履约评价等级3对应的衰减值
     */
    private double performanceLevel3Reduction = 10.0;


}
